package Utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.core.convert.converter.Converter;

public class StringToDate implements Converter<String, Date>{

	public Date convert(String arg0) {
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-mm-dd");
		
		Date date = null;
		try {
			date = simpleDateFormat.parse(arg0);
		} catch (ParseException e) {
			
			e.printStackTrace();
		}
		System.out.println(arg0);
		return date;
	}

}
